package statePattern;

public class StateDriver {
	public static void main(String[] args) {
		StateMachine machine = new StateMachine();
		machine.action1();
		System.out.println("current machine is in state "
				+ machine.getCurrentState());
		machine.action2();
		System.out.println("current machine is in state "
				+ machine.getCurrentState());
		machine.action3();
		System.out.println("current machine is in state "
				+ machine.getCurrentState());
		/**
		 * Switch state 1 to state 2
		current machine is in state 2
		Switch state 2 to state 3
		current machine is in state 3
		Switch state 3 to state 4
		current machine is in state 4
		 */
	}
}
